<template>
        <div>
             <!-- 轮播图区域 -->
                <mt-swipe :auto="4000" >
                  <!-- 在组件中，使用v-for循环的话，一定要使用 key -->
                  <mt-swipe-item v-for="item in lunbotuList" :key="item.id" >
                    <img :src="item.img" alt="" :class="{'isfull' :fullwith}">
                  </mt-swipe-item>
                </mt-swipe>

        </div>
</template>



<script>

import { Toast } from "mint-ui";

export default {
         data:function() {
            return{
                lunbotuList:[]
            }
        },

        created() {
                this.getLunboList()

        },

        methods: {
             getLunboList() {
                 for(var i = 0 ; i<5 ; i++) {
                      if(i %2 === 0) {
                           this.lunbotuList.push({id:i,img:'../../images/muwu.jpg'});         
                      } else {
                             this.lunbotuList.push({id:i,img:'../../images/shuijiao.jpg'});         
                      }
                      
                 }    
             }
        },
        components: {

        },
        props:['fullwith']
}
</script>


<style lang="less" scoped>

                      
                .mint-swipe {
                        height: 200px;
                        .mint-swipe-item {
                            text-align: center;
                                &:nth-child(odd) {
                                  background-color: yellowgreen;
                                }
                                &:nth-child(even) {
                                  background-color: pink;
                                }
                                .isfull {
                                   width: 100%;
                                }

                                img{
                                 height: 100%;
                                }
                        }
                    

  }
</style>